<!-- 机构下用户列表  -->
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	<h4 class="modal-title"><font color="red">机构用户</font>&nbsp;</h4>
</div>
<div class="modal-body">
	<form class="form-horizontal" role="form" id="orgUserForm">
		<input type="hidden" name="doCode" value="userList"/>
		<input type="hidden" name="userType" value="manager"/>
		<input type="hidden" name="orgId" value=""/>
		<table id="orgUserTable" class="table table-bordered table-hover" >
			<thead><tr>
				<th width="20%">账号</th>
				<th width="20%">姓名</th>
				<th width="10%">所属机构</th>
				<th width="15%">性别</th>
				<th width="15%">电话</th>
				<th width="15%">状态</th>
				</tr>
			</thead>
			<tbody id="orgUserList"></tbody>
		</table>
		<center><ul id="orgUserpageList"></ul></center>
	</form>
</div>
<script type="text/template" id="orgUserListData">
	  		<? for ( var i = 0; i < rows.length; i++) {?>
				<tr>
					<td style="display:none;"><?=rows[i].userId?></td>
					<td><?=rows[i].userEname?></td>
					<td><?=rows[i].userCname?></td>
					<td><?=rows[i].orgEname?></td>
                    <td><?if(rows[i].userSex=="M"){?>男<?}else{?>女<?}?>
                    </td>
                     <td><?=strUtil.doNull(rows[i].mobile,'')?></td>
                     <td><?if(rows[i].userStatus=="1"){?>
                        <font color=blue>1启用</font>
                       <?}else{?><font color=red>停用</font><?}?></td>
				</tr>
     		<?}?>
</script>
<script>
function getOrgUserListData(){
	deleteAllRow('orgUserTable');
	$("#orgUserForm").find("input[name=\"orgId\"]").val(id);
	$.ajax({type:'get',url:common_list_url,
		   data:$('#orgUserForm').serialize()+getCurrentPage(common_list_url+"?"+$('#orgUserForm').serialize(),10),
		   dataType:'json',
		   success: function(myData){
			var data = baidu.template('orgUserListData',eval(myData));  
			$("#orgUserList").html(data);
			  var option= {ele:$("#orgUserpageList")[0],total:myData.total,
					   fn:getOrgUserListData,url:common_list_url+"?"+$('#orgUserForm').serialize()
				   }
			  generatePages(option);
		   }
		});	
  }
</script>